package com.pccw.usercentercontroller.converter;

import com.pccw.usercentercontroller.vo.UserRegisterVO;
import com.pccw.usercentercontroller.vo.UserVO;
import com.pccw.usercenterservice.dto.SysUserDTO;
import com.pccw.usercenterservice.dto.UserRegisterDTO;

import javax.jws.soap.SOAPBinding;

public class UserConverter {

     public static UserRegisterDTO converteRegisteVo2DTO(UserRegisterVO userRegisterVO){
         UserRegisterDTO userRegisterDTO = new UserRegisterDTO();
         userRegisterDTO.setEmail(userRegisterVO.getEmail());
         userRegisterDTO.setPassword(userRegisterVO.getPassWord());
         userRegisterDTO.setUserName(userRegisterVO.getUserName());
         return userRegisterDTO;
     }

     public static UserVO converteUserDto2Vo(SysUserDTO sysUserDTO){
         UserVO userRespVO = new UserVO();
         userRespVO.setId(sysUserDTO.getId());
         userRespVO.setEmail(sysUserDTO.getEmail());
         userRespVO.setUserName(sysUserDTO.getUserName());
         return userRespVO;
     }

    public static SysUserDTO converteUserVO2Dto(UserVO userVO){
        SysUserDTO userRespVO = new SysUserDTO();
        userRespVO.setId(userVO.getId());
        userRespVO.setEmail(userVO.getEmail());
        userRespVO.setUserName(userVO.getUserName());
        return userRespVO;
    }
}
